<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>列表渲染</title>
</head>
<body>
<div id="div">
    <ul>

        <li v-for="element in names">
            {{element}}
        </li>

        <li v-for="element in student">
            {{element}}
        </li>

        <li v-for="(element,index) in names">
            {{element}},{{index}}
        </li>

        <li v-for="(element,index) in student">
            {{element}},{{index}}
        </li>

    </ul>
</div>
</body>
<script src="vue-2.6.12.js"></script>
<script>
    new Vue({
        el:"#div",
        data:{
            names:["张三","李四","王五"],
            student:{
                name:"张三",
                age:23
            }
        }
    });
</script>
<script>

</script>
</html>